<template>
    <div class="no-data">
        <template v-if="!loading">
            <img v-if="isPicture" class="no-data-img mb10" src="@img/public/noData.png" alt="noData">
            <p>暂无数据</p>
        </template>
        <template v-else>
            <img src="@img/public/loading.png" class="no-data-img mb10" alt="loading" v-if="isPicture">
            <p>加载中...</p>
        </template>
    </div>
</template>


<script setup>
const props = defineProps({
    isPicture: {
        type: Boolean,
        default: true
    },
    loading: {
        type: Boolean,
        default: false
    }
})
</script>

<style scoped>
.no-data {
    width: 100%;
}

.no-data img {
    width: 220px;
    height: 200px;
    margin: 0 auto;
    display: block;
}

.no-data p {
    font-size: 14px;
    text-align: center;
    color: #8a8a8a;
}
</style>